package server;

import java.util.LinkedList;

public class DispatcherList {

	private LinkedList<DispatcherInfo> list;

	public DispatcherList() {
		this.list = new LinkedList<DispatcherInfo>();
	}

	public DispatcherList(DispatcherList l) {
		this.list = new LinkedList<DispatcherInfo>(l.getList());
	}

	public synchronized DispatcherInfo get(int i) {
		return this.list.get(i);
	}

	public synchronized LinkedList<DispatcherInfo> getList() {
		return list;
	}

	public synchronized void remove(int i) {
		this.list.remove(i);
	}

	public synchronized void add(DispatcherInfo d) {
		this.list.add(d);
	}

	public synchronized boolean isEmpty() {
		return this.list.isEmpty();
	}

	public synchronized int size() {
		return this.list.size();
	}

}
